package cn.tedu.sprig.scope;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUser {
    @Test
    public void User(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean-scope.xml");
        User user1 = context.getBean("user", User.class);
        System.out.println(user1);

        User user2 = context.getBean("user", User.class);
        System.out.println(user2);
    }
}
